import socket


udpserver = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)

udpserver.connect(('127.0.0.1', 8880))


while True:
    sendData = input("输入发送数据:")

    udpserver.send(sendData.encode('utf-8'))

    returnMsg = udpserver.recv(1024)

    print("返回消息:" + returnMsg.decode('utf-8'))
